var g, app = getApp(), page = app.page, request = app.util.request, route = app.route, toast = app.toast;

page({
    data: {},
    onLoad: function(t) {
        g = this;
    },
    post: function(t) {
        var e = (t = t.detail.value).title, t = t.content;
        e ? t ? request({
            url: "Fankui",
            data: {
                title: e,
                content: t,
                type: g.options.type || 1,
                user_id: app.userInfo.id || wx.getStorageSync("userInfo").id
            },
            success: function(t) {
                1 == t ? (toast("提交成功,感谢您的反馈"), setTimeout(function() {
                    route({
                        type: "navigateBack"
                    });
                }, 1500)) : toast("提交失败:" + t);
            }
        }) : toast("请输入反馈内容") : toast("请输入反馈标题");
    }
});